package com.aca.market.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 仓储表
 * </p>
 *
 * @author aca
 * @since 2020-11-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class Storage implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 商品id(编号)
     */
    @TableId(value = "item_id", type = IdType.AUTO)
    private Long itemId;

    /**
     * 商品名
     */
    private String itemName;

    /**
     * 库存数量
     */
    private Integer inventory;

    /**
     * 库存预警数量
     */
    private Integer inventoryWarn;

    /**
     * 商品进货价格
     */
    private BigDecimal priceIn;

    /**
     * 生产商
     */
    private String manufacturer;

    /**
     * 销售量
     */
    private Integer sales;

    /**
     * 月进货量
     */
    private Long purchase;

    /**
     * 创建时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;


}
